import request from '@/utils/request'
let URL= 'teacher-oa'
// let URL= ''
//教师调代课-教师-我的申请分页查询
export function getApplyPage(query) {
  return request({
    url: URL + '/v1/substitute/apply/page',
    method: 'get',
    params: query
  })
}

//教师请假-审批人-我的审批分页查询
export function leaveApprovePage(query) {
  return request({
    url: URL + '/v1/leave/approve/page',
    method: 'get',
    params: query
  })
}

//教师调代课-调代课统计-我申请的分页查询
export function getApplyStatisticsPage(query) {
  return request({
    url: URL + '/v1/substitute/apply/statistics/page',
    method: 'get',
    params: query
  })
}

//通过id删除教师请假-请假类型配置
export function substituteApplyDetail(id) {
  return request({
    url: URL + '/v1/substitute/apply/detail/'+id,
    method: 'get',
  })
}
//教师调代课-审批人-我的审批分页查询
export function substituteApprovePage(query) {
  return request({
    url: URL + '/v1/substitute/approve/page',
    method: 'get',
    params: query
  })
}

//教师调代课-调代课统计-节数统计（我申请的、我审批的、老师调代课）
export function substituteStatisticsClasses(query) {
  return request({
    url: URL + '/v1/substitute/statistics/classes',
    method: 'get',
    params: query
  })
}

//教师调代课-调代课统计-我审批的分页查询
export function getApprovePage(query) {
  return request({
    url: URL + '/v1/substitute/approve/statistics/page',
    method: 'get',
    params: query
  })
}

//查询请假类型列表
export function getLeaveList(query) {
  return request({
    url: URL + '/v1/leave/typeconf/list',
    method: 'get',
    params: query
  })
}

//通过id修改请假类型状态
export function leaveTypeconfStatus(id,leaveStatus) {
  return request({
    url: URL + '/v1/leave/typeconf/status/'+id + '/' + leaveStatus,
    method: 'post',
  })
}

//通过id删除教师请假-请假类型配置
export function leaveTypeconfRemove(id) {
  return request({
    url: URL + '/v1/leave/typeconf/remove/'+id,
    method: 'post',
  })
}

//新增教师请假-请假类型配置
export function leaveTypeconfSave(data) {
  return request({
    url: URL + '/v1/leave/typeconf/save',
    method: 'post',
    data
  })
}

//修改教师请假-请假类型配置
export function leaveTypeconfEdit(data) {
  return request({
    url: URL + '/v1/leave/typeconf/edit',
    method: 'post',
    data
  })
}

//获取请假时间配置
export function getLeaveTimeconf(query) {
  return request({
    url: URL + '/v1/leave/timeconf/get',
    method: 'get',
    params: query
  })
}

//修改教师请假-请假类型配置
export function leaveTimeconfSave(data) {
  return request({
    url: URL + '/v1/leave/timeconf/save',
    method: 'post',
    data
  })
}

//查询请假时间上下午列表
export function leaveTimeapmList(query) {
  return request({
    url: URL + '/v1/leave/timeapm/list',
    method: 'get',
    params: query
  })
}

//通过id修改请假类型状态
export function leaveTimeapmStatus(id,apmStatus) {
  return request({
    url: URL + '/v1/leave/timeapm/status/'+id + '/' + apmStatus,
    method: 'post',
  })
}

//通过id删除教师请假-请假时间APM配置
export function leaveTimeapmRemove(id) {
  return request({
    url: URL + '/v1/leave/timeapm/remove/'+id,
    method: 'post',
  })
}

//新增教师请假-请假时间APM配置
export function leaveTimeapmSave(data) {
  return request({
    url: URL + '/v1/leave/timeapm/save',
    method: 'post',
    data
  })
}

//教师请假-教师-我的申请分页查询
export function leaveApplyPage(query) {
  return request({
    url: URL + '/v1/leave/apply/page',
    method: 'get',
    params: query
  })
}

export function leaveApplyDetail(id) {
  return request({
    url: URL + '/v1/leave/apply/detail/'+id,
    method: 'get',
  })
}

//教师调代课-审批人-我审批的调代课详情
export function substituteApproveDetail(id) {
  return request({
    url: URL + '/v1/substitute/approve/detail/'+id,
    method: 'get',
  })
}

//教师请假-教师-我审批的请假详情
export function leaveApproveDetail(id) {
  return request({
    url: URL + '/v1/leave/approve/detail/'+id,
    method: 'get',
  })
}

//教师调代课-调代课统计-老师调代课的分页查询
export function substituteTeacherStatisticsPage(query) {
  return request({
    url: URL + '/v1/substitute/teacher/statistics/page',
    method: 'get',
    params: query
  })
}

//教师调代课-调代课统计-老师调代课(具体某类)的分页查询
export function substituteTeacherStatisticsCoursePage(query) {
  return request({
    url: URL + '/v1/substitute/teacher/statistics/course/page',
    method: 'get',
    params: query
  })
}

//保存调代课配置管理
export function substituteConfSave(data) {
  return request({
    url: URL + '/v1/substitute/conf/save',
    method: 'post',
    data
  })
}

//获取调代课配置管理
export function substituteConfGet(query) {
  return request({
    url: URL + '/v1/substitute/conf/get',
    method: 'get',
    params: query
  })
}